package com.lizhi.yun.db.sfrobot.repository;

import com.lizhi.yun.db.sfrobot.entity.Patient;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PatientRepo extends JpaRepository<Patient, Long>, JpaSpecificationExecutor<Patient> {

    List <Patient> findAllByNameAndCertificateNoOrderByCreatedTimeDesc(String name, String certificateNo);

    List<Patient> findAllByDoctorIdAndHospitalIdOrderByCreatedTimeDesc(String doctorId, String hospitalId);
}
